package com.schoolinfo.model;
// default package

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Report entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="report"
)

public class Report  implements java.io.Serializable {


    // Fields    

     private Integer id;
     private Goods goods;
     private User user;
     private Timestamp reportTime;
     private String reason;


    // Constructors

    /** default constructor */
    public Report() {
    }

	/** minimal constructor */
    public Report(Goods goods, User user) {
        this.goods = goods;
        this.user = user;
    }
    
    /** full constructor */
    public Report(Goods goods, User user, Timestamp reportTime, String reason) {
        this.goods = goods;
        this.user = user;
        this.reportTime = reportTime;
        this.reason = reason;
    }

   
    // Property accessors
    @Id @GeneratedValue
    
    @Column(name="id", unique=true, nullable=false)

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="goodsId", nullable=false)

    public Goods getGoods() {
        return this.goods;
    }
    
    public void setGoods(Goods goods) {
        this.goods = goods;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="userId", nullable=false)

    public User getUser() {
        return this.user;
    }
    
    public void setUser(User user) {
        this.user = user;
    }
    
    @Column(name="reportTime", length=19)

    public Timestamp getReportTime() {
        return this.reportTime;
    }
    
    public void setReportTime(Timestamp reportTime) {
        this.reportTime = reportTime;
    }
    
    @Column(name="reason", length=65535)

    public String getReason() {
        return this.reason;
    }
    
    public void setReason(String reason) {
        this.reason = reason;
    }
   








}